package com.example.controller;

import com.example.entity.ReturnVo;
import com.example.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Auther:
 * @Date: 2021/11/20 17:23
 * @Description:
 */
@RestController
public class StudentController {
    @Autowired
    private StudentService studentService;

    @RequestMapping("selectById")
    public List<ReturnVo> selectById(Integer id){
        List<ReturnVo> returnVo = studentService.selectById(id);
        System.out.println(returnVo);
        return returnVo;
    }
    @RequestMapping("selectByName")
    public List<ReturnVo> selectByName(String name){
        return studentService.selectByName(name);
    }

    @RequestMapping("selectPageByName")
    public List<ReturnVo> selectPageByName(String name){
        return studentService.selectPageByName(name);
    }
    @RequestMapping("selectPageByVo")
    public List<ReturnVo> selectPageByVo(ReturnVo vo){
        return studentService.selectPageByVo(vo);
    }
}
